﻿using System;

namespace BingDesktopChanger
{
    internal enum StatusCode
    {
        ReadingIndexDocument = 1,
        AnalizingIndexDocument,
        GettingImage,
        ProcessingDay,
    }

    internal class StatusNotificationEventArgs : EventArgs
    {
        public StatusNotificationEventArgs(DateTime targetDay)
            : this(StatusCode.ProcessingDay)
        {
            this.StatusText = string.Concat(this.StatusText, ". Día actual: ", targetDay.ToShortDateString());
        }
        public StatusNotificationEventArgs(StatusCode statusCode)
        {
            this.StatusCode = statusCode;
            switch (statusCode)
            {
                case StatusCode.ReadingIndexDocument:
                    this.StatusText = "Leyendo índice de imagenes";
                    break;
                case StatusCode.AnalizingIndexDocument:
                    this.StatusText = "Analizando índice";
                    break;
                case StatusCode.GettingImage:
                    this.StatusText = "Obteniendo imágen";
                    break;
                case StatusCode.ProcessingDay:
                    this.StatusText = "Actualizando imágenes diarias";
                    break;
            }
        }

        internal StatusCode StatusCode { get; private set; }
        internal string StatusText { get; private set; }
        internal int ImagesCount { get; set; }
        internal int CurrentImageIndex { get; set; }
        internal string CurrentImageName { get; set; }
    }
}
